<template>
	<view>
		<status-bar title='选择类型'></status-bar>
		<view class="notice" v-if="content">
			<view class="bgf7f7 bor_radius_20 padding30">
				<u-parse :content="content" :domain="imgUrl"></u-parse>
			</view>
		</view>
        <view class="padding30">
            <view class="item m-bot40" @click="toUrl('/otherPage/forum/post?classifyid=' + item.classifyid)" v-for="(item,index) in list" :key="index">
				<image class="icon m-bot10" :src="$imgUrls(item.classimg || logo)" mode="aspectFill"></image>
                <view class="h6 color_33">{{ item.name }}</view>
            </view>
        </view>
	</view>
</template>

<script>
	import { mapState } from 'vuex'
	export default {
        data() {
            return {
				imgUrl: this.imgUrl,
				content: '',
                list: []
            }
        },
		computed: {
			...mapState(['logo'])
		},
        onLoad() {
            this.getList()
        },
		methods: {
            getList() {
                this.$http.get({
                    url: '/communityApi/getFilter'
                }).then(res => {
                    if(res.code != 100) return this.$Toast(res.msg)
                    this.list = res.data.class || []
					this.content = res.data.release
                })
            }
        }
	}
</script>

<style lang="scss" scoped>
	.notice {
		padding: 10rpx 20rpx 0;
		color: $uni-color-price;
	}
	.item {
		display: inline-block;
		width: 20%;
		text-align: center;
		.icon {
			width: 72rpx;
			height: 72rpx;
		}
	}
</style>
